<?php 
if (isset($result))
{
	foreach ($result as $variable_type_arr) {
		$pager = $variable_type_arr['var_obj'];
		?>
		<div class="row-fluid">
			<div class="span12">
				<div class="box gradient">
					<div class="title">
						<h4>
							<span><?php echo $variable_type_arr['var_type_name']?></span>
						</h4>
					</div>
					<div class="content noPad clearfix">
					  <table cellpadding="0" cellspacing="0" border="0" class="responsive dynamicTable display table table-bordered" width="100%">
						<thead>
						  <tr>
							<th>
								<span>Loại biến</span>
							</th>
							<th>
								<span>Tên biến</span>
							</th>
							<th>
								<span>Giá trị</span>
							</th>
							<th>
								<span>Kích hoạt</span>
							</th>
							<th>
								<span>Thao Tác</span>
							</th>
						  </tr>
						</thead>
						<tbody>
						  <?php foreach ($pager as $variable): ?>
							<tr>
								<td><?php echo VTNSVariable::$variable_types[$variable['variable_type']] ?></td>
								<td><?php echo $variable['variable_name'] ?></td>
								<td style='text-align:center;'><?php echo $variable['variable_value'] ?></td>
								<td style='text-align:center;'><?php echo ($variable['is_active'])?"<img src='/images/true.gif' />":"<img src='/images/false.gif' />"  ?></td>
								<td style="text-align:center"><?php echo link_to('Sửa', '@variable_edit?variable_id='.$variable['variable_id'])?></td>
							</tr>
						  <?php endforeach ?>
						</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
	<?php 
	}
}
?>